import { __private, _decorator, Button, Component, Node, NodeEventType } from 'cc';
import { UIBase } from '../utils/UIFramework/UIBase';
import { ProbeEventList } from '../utils/EventSystem/EventList';
const { ccclass, property } = _decorator;

@ccclass('menu')
export class MenuUI extends UIBase {

    StartGame : ProbeEventList = new ProbeEventList();

    public onInit(): void {
        super.onInit();
        this.uiMap.GetNode("Button").on(Button.EventType.CLICK,this.OnStartGameButtonDown,this);
    }

    public onClose(): void {
        this.StartGame.Clear();
    }

    private OnStartGameButtonDown() {
        this.StartGame.DoEvent(null);
    }
}


